﻿using HslCommunication;
using HslCommunication.ModBus;
using S7Project_One.Base;
using S7Project_One.MVVM;
using S7Project_One.Table;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace S7Project_One.Views
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            FreeBase.InitFreeSql();
            FreeBase.SQL.CodeFirst.SyncStructure<UserTable>();
            MainVM m = new MainVM();
            InitModbus();
            this.DataContext = m;
        }
        private  void  InitModbus() {
           Console.WriteLine("正在初始化Modbus TCP连接...");

        }
        private void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.DragMove();
        }
    }
}